package com.foreveross.bsl.mam.model.model.domain;

import java.util.Date;

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import com.foreveross.bsl.mongodb.domain.Entity;


/**
 * 此类描述的是：模块实体类
 * 
 * @author: panhm@foreveross.com
 * @version: 2013-6-19 下午4:37:00
 */

@Document
public class Widget extends Entity {

	/**
	 * id:TODO 主键
	 * 
	 * @since Ver 1.1
	 */

	@Id
	private String id;

	/**
	 * created_at:TODO 创建时间
	 * 
	 * @since Ver 1.1
	 */

	@Field("created_at")
	private Date created_at;

	/**
	 * modified_at:TODO 修改时间
	 * 
	 * @since Ver 1.1
	 */

	@Field("modified_at")
	private Date modified_at;

	/**
	 * available:TODO 是否有效
	 * 
	 * @since Ver 1.1
	 */

	@Field("available")
	private int available = 1;

	/**
	 * discription:TODO 简介
	 * 
	 * @since Ver 1.1
	 */

	@Field("discription")
	private String discription;

	/**
	 * category_id:TODO 分类id
	 * 
	 * @since Ver 1.1
	 */

	@Field("category_id")
	private String category_id;

	/**
	 * identify:TODO 模块标识
	 * 
	 * @since Ver 1.1
	 */

	@Field("identify")
	@Indexed(unique = true)
	private String identify;

	/**
	 * name:TODO 模块名称
	 * 
	 * @since Ver 1.1
	 */

	@Field("name")
	@Indexed(unique = true)
	private String name;

	/**
	 * icon_id:TODO logo图片存放文件表id值
	 * 
	 * @since Ver 1.1
	 */

	private String icon_id;

	@Field("hidden")
	private boolean hidden;
	// 时间单位
	@Field("timeUnit")
	private String timeUnit; // 默认为空，可输入“H”、“M”、“S”

	@Field("showIntervalTime")
	private String showIntervalTime;// 时间间隔

	@Field("autoShow")
	private boolean autoShow;// 是否自动弹出

	@Field("sortingWeight")
	private int sortingWeight;// 权重
	// 本地模块 入口程序
	@Field("local")
	private String local;
	// 是否自动下载
	@Field("autoDownload")
	private boolean autoDownload;

	/**
	 * 是否默认应用权限
	 */
	@Field("appAuth")
	private boolean appAuth;

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.foreveross.common.domain.Entity#getEntityRepositoryClass()
	 */

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public Date getCreated_at() {
		return created_at;
	}

	public void setCreated_at(Date created_at) {
		this.created_at = created_at;
	}

	public Date getModified_at() {
		return modified_at;
	}

	public void setModified_at(Date modified_at) {
		this.modified_at = modified_at;
	}

	public int getAvailable() {
		return available;
	}

	public void setAvailable(int available) {
		this.available = available;
	}

	public String getDiscription() {
		return discription;
	}

	public void setDiscription(String discription) {
		this.discription = discription;
	}

	public String getCategory_id() {
		return category_id;
	}

	public void setCategory_id(String category_id) {
		this.category_id = category_id;
	}

	public String getIdentify() {
		return identify;
	}

	public void setIdentify(String identify) {
		this.identify = identify;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getIcon_id() {
		return icon_id;
	}

	public void setIcon_id(String icon_id) {
		this.icon_id = icon_id;
	}

	public boolean isHidden() {
		return hidden;
	}

	public void setHidden(boolean hidden) {
		this.hidden = hidden;
	}

	public String getTimeUnit() {
		return timeUnit;
	}

	public void setTimeUnit(String timeUnit) {
		this.timeUnit = timeUnit;
	}

	public String getShowIntervalTime() {
		return showIntervalTime;
	}

	public void setShowIntervalTime(String showIntervalTime) {
		this.showIntervalTime = showIntervalTime;
	}

	public boolean isAutoShow() {
		return autoShow;
	}

	public void setAutoShow(boolean autoShow) {
		this.autoShow = autoShow;
	}

	public int getSortingWeight() {
		return sortingWeight;
	}

	public void setSortingWeight(int sortingWeight) {
		this.sortingWeight = sortingWeight;
	}

	public String getLocal() {
		return local;
	}

	public void setLocal(String local) {
		this.local = local;
	}

	public boolean isAutoDownload() {
		return autoDownload;
	}

	public void setAutoDownload(boolean autoDownload) {
		this.autoDownload = autoDownload;
	}

	public boolean isAppAuth() {
		return appAuth;
	}

	public void setAppAuth(boolean appAuth) {
		this.appAuth = appAuth;
	}


}
